package com.yjt.oauth.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * @author 曾智平
 * @ClassName: LoginInfo
 * @Description: 登录信息
 * @date 2021/7/15 9:31
 */
@Data
@ApiModel("登录参数")
public class LoginForm {

    @ApiModelProperty(name = "platform",value = "登录平台(后台用户--ADMIN,前台用户--APP)",example = "ADMIN")
    @NotBlank(message = "登录平台不能为空")
    private String platform;

    @ApiModelProperty(name = "username",value = "用户名称或者手机号",example = "123456")
    @NotBlank(message = "用户名称或者手机号不能为空")
    private String username;

    @ApiModelProperty(name = "password",value = "密码",example = "123456")
    @NotBlank(message = "密码不能为空")
    private String password;

    @ApiModelProperty(name = "grantType",value = "认证类型(password,client_credentials,authorization_code)",example = "password")
    @NotBlank(message = "认证类型不能为空")
    private String grantType;
}
